﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace DiaryPlanner
{
    
    public partial class AccPost : UserControl
    {



        public Account thisAccObject;


        public AccPost(Account AccObject)
        {
            thisAccObject = AccObject;
            InitializeComponent();
        }

        private void AccPost_Load(object sender, EventArgs e)
        {

        }

        private void btnDelete_Click(object sender, EventArgs e)
        {

            thisAccObject.nowAccPost = this;
            if (thisAccObject.nowAccPost.label4.Text.Equals("월수입") || thisAccObject.nowAccPost.label4.Text.Equals("월지출"))
            {
                MessageBox.Show("정기수입 및 지출은 설정창에서 삭제가 가능합니다.");
            }
            else
            {
                AccDeleteDialog AccDeleteDialogObject = new AccDeleteDialog(thisAccObject);
                AccDeleteDialogObject.ShowDialog();
            }
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            thisAccObject.nowAccPost = this;
            if (thisAccObject.nowAccPost.label4.Text.Equals("월수입") || thisAccObject.nowAccPost.label4.Text.Equals("월지출"))
            {
                MessageBox.Show("정기수입 및 지출은 설정창에서 수정이 가능합니다.");
            }
            else
            {
                AccEdit AccEditObject = new AccEdit(thisAccObject);
                AccEditObject.ShowDialog();
            }
        }
        
        
    }
}
